home *** CD-ROM | disk | FTP | other *** search
/ PC World 2008 September / PCWorld_2008-09_cd.bin / v cisle / sadanastroju / autocomplete_manager-2.3-fx.xpi / chrome / acmanager.jar / content / options.xul < prev    next >
Extensible Markup Language  |  2008-03-14  |  25KB  |  516 lines

  1. <?xml version="1.0"?> 
  2.  
  3. <!-- ***** BEGIN LICENSE BLOCK *****
  4.    - Version: MPL 1.1
  5.    -
  6.    - The contents of this file are subject to the Mozilla Public License Version
  7.    - 1.1 (the "License"); you may not use this file except in compliance with
  8.    - the License. You may obtain a copy of the License at
  9.    - http://www.mozilla.org/MPL/
  10.    -
  11.    - Software distributed under the License is distributed on an "AS IS" basis,
  12.    - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.    - for the specific language governing rights and limitations under the License.
  14.    -
  15.    - The Original Code is the Autocomplete Manager extension.
  16.    -
  17.    - The Initial Developer of the Original Code is
  18.    - Nikitas Liogkas <nikitas@acm.org>.
  19.    - Portions created by the Initial Developer are Copyright (C) 2005-2008
  20.    - the Initial Developer. All Rights Reserved.
  21.    -
  22.    - Contributor(s): 
  23.    - Version 2.3
  24.    -
  25.    - ***** END LICENSE BLOCK ***** -->
  26.  
  27. <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> 
  28. <?xml-stylesheet href="chrome://acmanager/skin/acmanager.css" type="text/css"?>
  29.  
  30. <prefwindow xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  31.             id="ACM_Options"
  32.         title="Autocomplete Manager" 
  33.         resizable="yes"
  34.             persist="width height screenX screenY"
  35.             onload="opener.acm_dialogOpen = true; acm_recordPreferences(); acm_updateUIDependencies();"
  36.         onunload="acm_enforcePreferences(); opener.acm_dialogOpen = false;">
  37.  
  38.   <prefpane id="acm_paneOptions" label="Options">
  39.     <preferences>
  40.       <preference id="extensions.acmanager.active_component" 
  41.                   name="extensions.acmanager.active_component" type="string"/> 
  42.       <preference id="extensions.acmanager.enhanced.match_bookmarks" 
  43.                   name="extensions.acmanager.enhanced.match_bookmarks" type="bool"/>
  44.       <preference id="extensions.acmanager.enhanced.match_titles" 
  45.                   name="extensions.acmanager.enhanced.match_titles" type="bool"/>
  46.       <preference id="extensions.acmanager.enhanced.exclude_local" 
  47.                   name="extensions.acmanager.enhanced.exclude_local" type="bool"/>
  48.       <preference id="extensions.acmanager.enhanced.exclude_search" 
  49.                   name="extensions.acmanager.enhanced.exclude_search" type="bool"/>
  50.       <preference id="extensions.acmanager.enhanced.match_alladdress" 
  51.                   name="extensions.acmanager.enhanced.match_alladdress" type="bool"/>
  52.       <preference id="extensions.acmanager.enhanced.sortby" 
  53.                   name="extensions.acmanager.enhanced.sortby" type="string"/> 
  54.       <preference id="extensions.acmanager.enhanced.show_titles" 
  55.                   name="extensions.acmanager.enhanced.show_titles" type="bool"/>
  56.       <preference id="extensions.acmanager.enhanced.show_date" 
  57.                   name="extensions.acmanager.enhanced.show_date" type="bool"/>
  58.       <preference id="extensions.acmanager.enhanced.inline" 
  59.                   name="extensions.acmanager.enhanced.inline" type="bool"/>
  60.       <preference id="extensions.acmanager.enhanced.swap_columns" 
  61.                   name="extensions.acmanager.enhanced.swap_columns" type="bool"/>
  62.       <preference id="extensions.acmanager.enhanced.bold_matching" 
  63.                   name="extensions.acmanager.enhanced.bold_matching" type="bool"/>
  64.       <preference id="extensions.acmanager.enhanced.show_onarrow" 
  65.                   name="extensions.acmanager.enhanced.show_onarrow" type="bool"/>
  66.       <preference id="extensions.acmanager.enhanced.maxrows" 
  67.                   name="extensions.acmanager.enhanced.maxrows" type="int"/>
  68.       <preference id="extensions.acmanager.enhanced.address_trunc" 
  69.                   name="extensions.acmanager.enhanced.address_trunc" type="string"/>  
  70.       <preference id="extensions.acmanager.enhanced.title_trunc" 
  71.                   name="extensions.acmanager.enhanced.title_trunc" type="string"/>
  72.       <preference id="extensions.acmanager.enhanced.bookmarks_first" 
  73.                   name="extensions.acmanager.enhanced.bookmarks_first" type="bool"/> 
  74.       <preference id="extensions.acmanager.default.show_titles" 
  75.                   name="extensions.acmanager.default.show_titles" type="bool"/>
  76.       <preference id="browser.urlbar.matchOnlyTyped" name="browser.urlbar.matchOnlyTyped" 
  77.                   type="bool"/>
  78.       <preference id="browser.urlbar.autoFill" name="browser.urlbar.autoFill" type="bool"/>
  79.       <preference id="extensions.acmanager.default.maxrows" 
  80.                   name="extensions.acmanager.default.maxrows" type="int"/>
  81.     </preferences>
  82.  
  83.     <!-- these have to be here, not before prefpane (bug 296418) -->
  84.     <script type="application/javascript; version=1.7" src="chrome://acmanager/content/rdfUtils.js"/> 
  85.     <script type="application/javascript" src="chrome://acmanager/content/treeUtils.js"/>
  86.     <script type="application/javascript" src="chrome://acmanager/content/options.js"/>
  87.     <script type="application/javascript" src="chrome://acmanager/content/aggregator.js"/>
  88.     <script type="application/javascript" src="chrome://acmanager/content/acpopup.js"/>
  89.  
  90.     <description class="header">
  91.       Customize the functionality and appearance of the address Autocomplete component.
  92.     </description>
  93.     <separator class="groove-thin"/>    
  94.     <separator class="thin"/>
  95.        
  96.     <tabbox id="acm_tabbox">
  97.       <tabs> 
  98.         <tab label="Active Component"/>
  99.         <tab label="Enhanced Component Options"/>
  100.         <tab label="Default Component Options"/>
  101.       </tabs>
  102.   
  103.       <tabpanels flex="1"> 
  104.         <tabpanel flex="1" orient="vertical">
  105.           <description>Select Autocomplete component to use</description>
  106.           <!-- the values to return from onsyncfrompreference are correlated with the 'value' attribute 
  107.                of the radios; onsynctopreference/onsyncfrompreference will also be called when clicking 
  108.                on a radio -->
  109.           <radiogroup id="extensions.acmanager.active_component" 
  110.                       preference="extensions.acmanager.active_component"
  111.                       onsyncfrompreference="
  112.                         if (acm_active_component)
  113.                           return;  
  114.                         var active_component = acm_getPreference(ACM_ACTIVE_COMPONENT);
  115.                         if (active_component === 'default') 
  116.                           return 'default';
  117.                         else if (active_component === 'off')
  118.                           return 'off';
  119.                         else
  120.                           return 'enhanced';"
  121.                       onsynctopreference="
  122.                         acm_updateUIDependencies(); 
  123.                         var radios = document.getElementById(ACM_ACTIVE_COMPONENT).childNodes;
  124.                         if (radios[1].selected) 
  125.                           return 'default';
  126.                         else if (radios[2].selected) 
  127.                           return 'off';
  128.                         else
  129.                           return 'enhanced';">
  130.  
  131.             <radio id="acm_enhanced_radio" label="Enhanced" value="enhanced"/>
  132.             <radio id="acm_default_radio" label="Default" value="default"/>
  133.             <radio label="Off" value="off"/>
  134.       </radiogroup>
  135.         </tabpanel>
  136.  
  137.         <tabpanel flex="1" orient="vertical">
  138.           <groupbox>
  139.           <caption label="Entry Selection"/>
  140.             <grid flex="1">
  141.             <columns>
  142.             <column/>
  143.             <column/>
  144.           </columns>
  145.               <rows>
  146.                 <row>
  147.                   <checkbox id="extensions.acmanager.enhanced.match_bookmarks"
  148.                             preference="extensions.acmanager.enhanced.match_bookmarks"
  149.                             label="Include bookmarks"
  150.                         onsynctopreference="acm_setBookmarksPosition();"/>
  151.                 </row>
  152.                 <row>
  153.                   <checkbox id="extensions.acmanager.enhanced.match_titles" 
  154.                             preference="extensions.acmanager.enhanced.match_titles" 
  155.                             label="Match page titles (bookmark names)"/>
  156.                   <checkbox id="extensions.acmanager.enhanced.match_alladdress" 
  157.                             preference="extensions.acmanager.enhanced.match_alladdress" 
  158.                             label="Match anywhere in the address"/>
  159.                 </row>
  160.                 <row>
  161.                   <checkbox id="extensions.acmanager.enhanced.exclude_local"
  162.                             preference="extensions.acmanager.enhanced.exclude_local" 
  163.                             label="Exclude local pages"/>
  164.                   <checkbox id="extensions.acmanager.enhanced.exclude_search" 
  165.                             preference="extensions.acmanager.enhanced.exclude_search" 
  166.                             label="Attempt to exclude search result pages"/>
  167.             </row>
  168.               </rows>
  169.             </grid>
  170.           </groupbox>
  171.  
  172.           <groupbox>
  173.             <caption label="Sorting Criterion (Ctrl+# to sort on the fly)"/>
  174.             <!-- the childNodes of a radiogroup are always its radio buttons, even if nested! -->
  175.             <radiogroup id="extensions.acmanager.enhanced.sortby"
  176.                         preference="extensions.acmanager.enhanced.sortby"
  177.                         onsyncfrompreference="           
  178.                           if (acm_active_component)
  179.                             return;              
  180.                           var sortby = acm_getPreference(ACM_SORTBY);
  181.                           if (sortby === 'top')
  182.                             return 'top';
  183.                           if (sortby === 'mfu')
  184.                             return 'mfu';
  185.                           if (sortby === 'mru')
  186.                             return 'mru';
  187.                           if (sortby === 'alpha_address')
  188.                             return 'alpha_address';
  189.                           if (sortby === 'alpha_title')
  190.                             return 'alpha_title';                      
  191.                           else
  192.                             return 'default';"
  193.                         onsynctopreference="
  194.                           var radios = document.getElementById(ACM_SORTBY).childNodes;
  195.                           if (radios[1].selected) 
  196.                             return 'top';
  197.                           else if (radios[2].selected) 
  198.                             return 'mfu';
  199.                           else if (radios[3].selected) 
  200.                             return 'mru';
  201.                           else if (radios[4].selected) 
  202.                             return 'alpha_address';
  203.                           else if (radios[5].selected) 
  204.                             return 'alpha_title';
  205.                           else 
  206.                             return 'default';">
  207.  
  208.             <!-- if you change the number of choices here, also change acm_urlbarNavigation() -->
  209.             <grid flex="1">
  210.             <columns>
  211.             <column/>
  212.             <column/>
  213.           </columns>
  214.               <rows>
  215.                 <row>
  216.                   <radio label="1. Firefox 2 default" value="default"/>
  217.                   <radio label="2. Top-level pages first" value="top"/>
  218.                 </row>
  219.                 <row>
  220.                   <radio label="3. Most frequently visited first" value="mfu"/>
  221.                   <radio label="4. Most recently visited first" value="mru"/>
  222.             </row>
  223.                 <row>
  224.                   <radio label="5. Alphabetically by address" value="alpha_address"/>
  225.                   <radio label="6. Alphabetically by title" value="alpha_title"/>
  226.                 </row>
  227.                 <groupbox>
  228.                   <caption label="Bookmarks Position"/>
  229.                   <!-- NOTE: childNodes doesn't work for this!? -->
  230.                   <radiogroup id="extensions.acmanager.enhanced.bookmarks_first"
  231.                               preference="extensions.acmanager.enhanced.bookmarks_first"
  232.                               onsyncfrompreference="
  233.                                 if (acm_active_component)
  234.                                   return;  
  235.                                 if (acm_getPreference(ACM_BOOKMARKS_FIRST))
  236.                                   return 'first';
  237.                                 else
  238.                                   return 'default';"
  239.                               onsynctopreference="
  240.                                 var firstRadio = document.getElementById('acm_bookmarks_first_radio');
  241.                                 return firstRadio.selected;">
  242.  
  243.                     <radio label="According to sorting criterion" value="default"/>
  244.                     <radio id="acm_bookmarks_first_radio" label="Always place bookmarks first" 
  245.                            value="first"/>
  246.                   </radiogroup>
  247.                 </groupbox>
  248.               </rows>
  249.             </grid>
  250.             </radiogroup>
  251.           </groupbox>
  252.  
  253.           <groupbox>
  254.           <caption label="Suggestion Popup"/>     
  255.         <grid flex="1">
  256.             <columns>
  257.             <column/>
  258.             <column/>
  259.           </columns>
  260.               <rows>
  261.                 <row>      
  262.                   <checkbox id="extensions.acmanager.enhanced.show_titles" 
  263.                             preference="extensions.acmanager.enhanced.show_titles" 
  264.                             label="Show page titles (bookmark names)"
  265.                             onsynctopreference="acm_setSwapColumns();"/>
  266.                   <checkbox id="extensions.acmanager.enhanced.show_date" 
  267.                             preference="extensions.acmanager.enhanced.show_date" 
  268.                             label="Show last visit date"/>
  269.  
  270.             </row>
  271.                 <row> 
  272.                   <checkbox id="extensions.acmanager.enhanced.swap_columns" 
  273.                             preference="extensions.acmanager.enhanced.swap_columns" 
  274.                             label="Swap address and title columns"/>
  275.                   <checkbox id="extensions.acmanager.enhanced.bold_matching" 
  276.                             preference="extensions.acmanager.enhanced.bold_matching" 
  277.                             label="Bold matching column"/>
  278.             </row>
  279.                 <row>      
  280.                   <checkbox id="extensions.acmanager.enhanced.inline" 
  281.                             preference="extensions.acmanager.enhanced.inline" 
  282.                             label="Fill best match inline"/>
  283.                   <checkbox id="extensions.acmanager.enhanced.show_onarrow" 
  284.                             preference="extensions.acmanager.enhanced.show_onarrow" 
  285.                             label="Only show popup on down arrow"/>
  286.                 </row>
  287.                 <row>
  288.               <grid flex="1">
  289.                   <columns>
  290.                   <column/>
  291.                   <column flex="1"/>
  292.                    </columns>
  293.                     <rows>
  294.                       <row>
  295.                         <hbox align="center">
  296.                         <label value="Number of visible suggestions"/>
  297.                           <textbox id="extensions.acmanager.enhanced.maxrows" maxlength="2"
  298.                                    preference="extensions.acmanager.enhanced.maxrows" maxwidth="100" 
  299.                                    onblur="acm_validateMaxrowsValues();"/>
  300.                         </hbox>
  301.                       </row>
  302.                     </rows>
  303.                   </grid>
  304.             </row>
  305.                 <row>
  306.                   <groupbox>
  307.                     <caption label="Address Truncation"/>
  308.                     <radiogroup id="extensions.acmanager.enhanced.address_trunc"
  309.                                 preference="extensions.acmanager.enhanced.address_trunc"
  310.                                 onsyncfrompreference="
  311.                                   if (acm_active_component)
  312.                                     return;  
  313.                                   var address_truncation = acm_getPreference(ACM_ADDRESS_TRUNC);
  314.                                     if (address_truncation === 'start')
  315.                                       return 'start';
  316.                                     else if (address_truncation === 'center')
  317.                                       return 'center';
  318.                                     else
  319.                                       return 'end';"
  320.                                 onsynctopreference="
  321.                                   var radios = document.getElementById(ACM_ADDRESS_TRUNC).childNodes;
  322.                                   if (radios[0].selected)
  323.                                     return 'start';
  324.                                   else if (radios[1].selected)
  325.                                     return 'center';       
  326.                                   else
  327.                                     return 'end';">
  328.                     <hbox>
  329.                       <radio label="Left"   value="start"/>
  330.                       <radio label="Center" value="center"/>
  331.                       <radio label="Right"  value="end"/>
  332.                     </hbox>
  333.                     </radiogroup>
  334.                   </groupbox>
  335.                   <groupbox>
  336.                     <caption label="Title Truncation"/>
  337.                     <radiogroup id="extensions.acmanager.enhanced.title_trunc"
  338.                                 preference="extensions.acmanager.enhanced.title_trunc"
  339.                                 onsyncfrompreference="
  340.                                   if (acm_active_component)
  341.                                     return;  
  342.                                   var title_truncation = acm_getPreference(ACM_TITLE_TRUNC);
  343.                                     if (title_truncation === 'start')
  344.                                       return 'start';
  345.                                     else if (title_truncation === 'center')
  346.                                       return 'center';
  347.                                     else
  348.                                       return 'end';"
  349.                                 onsynctopreference="
  350.                                   var radios = document.getElementById(ACM_TITLE_TRUNC).childNodes;
  351.                                   if (radios[0].selected)
  352.                                     return 'start';
  353.                                   else if (radios[1].selected)
  354.                                     return 'center';       
  355.                                   else
  356.                                     return 'end';">
  357.                     <hbox>
  358.                       <radio label="Left"   value="start"/>
  359.                       <radio label="Center" value="center"/>
  360.                       <radio label="Right"  value="end"/>
  361.                     </hbox>
  362.                     </radiogroup>
  363.                   </groupbox>
  364.                 </row>
  365.               </rows>
  366.             </grid>
  367.  
  368.           </groupbox>
  369.         </tabpanel>
  370.  
  371.         <tabpanel flex="1" orient="vertical">
  372.           <checkbox id="extensions.acmanager.default.show_titles" label="Show page titles" 
  373.                     preference="extensions.acmanager.default.show_titles"/>
  374.           <checkbox label="Only match manually-typed entries"
  375.                     preference="browser.urlbar.matchOnlyTyped"/>
  376.           <checkbox label="Fill best match inline"
  377.                     preference="browser.urlbar.autoFill"/>
  378.           <grid flex="1">
  379.         <columns>
  380.           <column/>
  381.           <column flex="1"/>
  382.         </columns>
  383.             <rows>
  384.               <row>
  385.                 <hbox align="center">
  386.               <label value="Number of visible suggestions"/>
  387.                   <textbox id="extensions.acmanager.default.maxrows" maxlength="2"
  388.                            preference="extensions.acmanager.default.maxrows" maxwidth="100" 
  389.                            onblur="acm_validateMaxrowsValues();"/>
  390.                 </hbox>
  391.           </row>
  392.             </rows>
  393.           </grid>
  394.         </tabpanel> 
  395.  
  396.       </tabpanels>
  397.     </tabbox>  
  398.   </prefpane>
  399.  
  400.   <prefpane id="acm_paneManager" label="History Manager">
  401.     <description class="header">Add and remove history entries.</description>
  402.     <separator class="groove-thin"/>    
  403.     <separator class="thin"/>
  404.  
  405.     <tree id="acm_historyTree" flex="1" height="300" enableColumnDrag="true" hidecolumnpicker="true"
  406.           onkeypress="acm_handleKey(event);" onselect="acm_historyEntrySelected();">
  407.       <treecols>
  408.         <!-- TOFIX: can also persist sortDirection -->
  409.         <treecol id="colURL" label="Page address" flex="2" class="sortDirectionIndicator"
  410.                  onclick="acm_sortHistoryColumn('URL');" persist="width ordinal"/>
  411.         <splitter class="tree-splitter"/>
  412.         <treecol id="coltitle" label="Title" flex="1" class="sortDirectionIndicator"
  413.                  onclick="acm_sortHistoryColumn('title');" persist="width ordinal"/>
  414.       </treecols>
  415.       <treechildren/>
  416.     </tree> 
  417.  
  418.     <groupbox>
  419.       <caption label="Information about the selected entry"/>
  420.       <grid flex="1">
  421.         <columns>
  422.       <column/>
  423.       <column flex="1"/>
  424.         </columns>
  425.  
  426.         <!-- If you change the ids of these textboxes, also change the history entry 
  427.              textbox ids at the top of options.js -->
  428.         <rows>
  429.       <row align="center">
  430.             <hbox align="center" pack="end"><label value="Title:"/></hbox>
  431.              <textbox id="he_title" readonly="true" class="plain"/>
  432.       </row>
  433.       <row align="center">
  434.             <hbox align="center" pack="end"><label value="Page Address:"/></hbox>
  435.          <textbox id="he_address" readonly="true" class="plain"/>
  436.       </row>
  437.       <row align="center">
  438.             <hbox align="center" pack="end"><label value="First Visit Date:"/></hbox>
  439.             <textbox id="he_first_visit" readonly="true" class="plain"/>
  440.       </row>
  441.       <row align="center">
  442.             <hbox align="center" pack="end"><label value="Last Visit Date:"/></hbox>
  443.         <textbox id="he_last_visit" readonly="true" class="plain"/>
  444.       </row>
  445.           <row align="center">
  446.             <hbox align="center" pack="end"><label value="Number of Visits:"/></hbox>
  447.         <textbox id="he_visit_count" readonly="true" class="plain"/>
  448.       </row>
  449.         </rows>
  450.       </grid>
  451.     </groupbox>
  452.  
  453.     <!-- If you change the ids of the remove buttons, also change those 
  454.      in the corresponding command functions in options.js -->
  455.     <hbox>
  456.       <button id="populateHistEntries" label="Retrieve history entries"
  457.               oncommand="acm_populateHistoryEntries();"/>
  458.       <button id="addHistoryEntry" label="Add" disabled="true"
  459.               oncommand="window.openDialog('chrome://acmanager/content/addEntry.xul', '',
  460.                  'chrome, modal, resizable');"/>
  461.       <!-- <button id="editHistoryEntry" label="Edit" disabled="true" 
  462.                    oncommand="window.openDialog('chrome://acmanager/content/editDialog.xul', '',
  463.                      'chrome, modal, resizable');"/> -->
  464.       <button id="removeHistoryEntry" label="Remove" disabled="true" oncommand="acm_removeHistoryEntry();"/>
  465.       <button id="removeAllHistoryEntries" label="Remove All" disabled="true" 
  466.               oncommand=" acm_removeAllHistEntries();"/>
  467.     </hbox>
  468.   </prefpane>
  469.  
  470.   <prefpane id="acm_paneAbout" label="About">
  471.     <!-- descriptions have to be broken in parts to avoid oversizing the options dialog -->
  472.     <description class="header">
  473.       Autocomplete Manager extension for Mozilla Firefox - version 2.3
  474.     </description>
  475.     <separator class="groove-thin"/>
  476.     <description>
  477.       This extension provides advanced features for the address Autocomplete component in Firefox, 
  478.     </description>
  479.     <description>
  480.       and includes fixes for Autocomplete-related bugs, as well as a rudimentary history manager.
  481.     </description>
  482.     <description>
  483.       For a list of the available features and to download the latest version, please visit 
  484.       <label value="the official extension page" class="text-link" 
  485.            href="http://www.cs.ucla.edu/~nikitas/acmanager/"/>.
  486.     </description>
  487.     <description class="header">
  488.       Shortcuts
  489.     </description>
  490.     <description>
  491.       Alt+L: focus on the location bar, temporarily disabling the popup
  492.     </description>
  493.     <description>
  494.       Middle-click on a popup entry to open it in a new tab
  495.     </description>
  496.     <description>
  497.       Ctrl+1 through Ctrl+6: when the popup is open, sort the suggestion list according to 
  498.       the respective criterion 
  499.     </description>
  500.     <hbox pack="left">
  501.       <image src="chrome://acmanager/skin/acmanager-logo.jpg" width="425" height="283"/>
  502.     </hbox>
  503.     <description>          
  504.       The Autocomplete Manager is brought to you by Nikitas Liogkas (nikitas@acm.org), and it is
  505.     </description>
  506.     <description> 
  507.       distributed under the Mozilla Public License, version 1.1. Please see
  508.       <label value="the MPL official page" class="text-link" href="http://www.mozilla.org/MPL/"/> 
  509.       for more details.
  510.     </description>
  511.   </prefpane>
  512.  
  513. </prefwindow>
  514.  
  515.  
  516.